home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.37
/
battclock
/
units
/
battclocklight.p
< prev
next >
Wrap
Text File
|
1994-09-17
|
2KB
|
78 lines
{ Unit: BattClockLight
Version: 1.04 (1993-1994)
Meaning: read battclock: time and day an put it in two strings
for: KP2.12/OS2 or MaxonPASCAL3
Copyright: FW, you must use authors name in Info or Doc
Author: PackMAN
c/o Falk Zühlsdorff
Lindenberg 66
D-98693 Ilmenau / Thuringia }
UNIT BattClockLight;
INTERFACE
{$opt q}
Uses UTILITY;
{$ INCL 'resources/battclock.h'} {MP3: + battclock.lib}
FUNCTION GetBattClockL:boolean;
VAR battclocktime,
battclockdate : string; {wanna use PROCEDURE(VAR: )}
IMPLEMENTATION
FUNCTION GetBattClockL;
VAR current:p_ClockData;
BEGIN
BattclockBase:=OpenResource(BATTCLOCKNAME);
IF (BattclockBase<>NIL) AND (UtilityBase<>NIL)
THEN
BEGIN
NEW(current);
Amiga2Date(ReadBattClock,current);
battclockdate:='';
IF current^.mday<10
THEN battclockdate:=('0'+INTSTR(current^.mday)+'.')
ELSE battclockdate:=(INTSTR(current^.mday)+'.');
IF current^.month<10
THEN battclockdate:=(battclockdate+'0'+INTSTR(current^.month)+
'.'+INTSTR(current^.year))
ELSE battclockdate:=(battclockdate+INTSTR(current^.month)+'.'+
INTSTR(current^.year));
battclocktime:='';
IF current^.hour<10
THEN battclocktime:=('0'+INTSTR(current^.hour)+':')
ELSE battclocktime:=(INTSTR(current^.hour)+':');
IF current^.min<10
THEN battclocktime:=(battclocktime+'0'+INTSTR(current^.min)+':')
ELSE battclocktime:=(battclocktime+INTSTR(current^.min)+':');
IF current^.sec<10
THEN battclocktime:=(battclocktime+'0'+INTSTR(current^.sec))
ELSE battclocktime:=(battclocktime+INTSTR(current^.sec));
GetBattclockL:=true;
END
ELSE
GetBattclockL:=false;
END;
END.